package com.ruoyi.supermarket.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 促销管理对象 promotion
 *
 * @author xfq
 * @date 2024-07-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Promotion implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 促销id */
    private Long promotionId;

    /** 商品外键id */
    @Excel(name = "商品外键id")
    private Long gid;

    /** 促销名称 */
    @Excel(name = "促销名称")
    private String promotionName;

    /** 促销折扣 */
    @Excel(name = "促销折扣")
    private BigDecimal promotionDiscount;

    /** 促销时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "促销时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date promotionTime;

    /** 删除标记 */
    private Long deleted;

    public void setPromotionId(Long promotionId)
    {
        this.promotionId = promotionId;
    }

    public Long getPromotionId()
    {
        return promotionId;
    }
    public void setGid(Long gid)
    {
        this.gid = gid;
    }

    public Long getGid()
    {
        return gid;
    }
    public void setPromotionName(String promotionName)
    {
        this.promotionName = promotionName;
    }

    public String getPromotionName()
    {
        return promotionName;
    }
    public void setPromotionDiscount(BigDecimal promotionDiscount)
    {
        this.promotionDiscount = promotionDiscount;
    }

    public BigDecimal getPromotionDiscount()
    {
        return promotionDiscount;
    }
    public void setPromotionTime(Date promotionTime)
    {
        this.promotionTime = promotionTime;
    }

    public Date getPromotionTime()
    {
        return promotionTime;
    }
    public void setDeleted(Long deleted)
    {
        this.deleted = deleted;
    }

    public Long getDeleted()
    {
        return deleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("promotionId", getPromotionId())
            .append("gid", getGid())
            .append("promotionName", getPromotionName())
            .append("promotionDiscount", getPromotionDiscount())
            .append("promotionTime", getPromotionTime())
            .append("deleted", getDeleted())
            .toString();
    }
}
